package com.usian.controller;

import com.usian.pojo.User;
import com.usian.service.UserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @Autowired
    private UserServiceImpl userService;

    @RequestMapping("/findById/{id}")
    public User findById(@PathVariable  int id){
        return userService.findById(id);
    }
}
